<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
        $(function () {
            $.ajax({
                url:"/captcha",
                method:"get",
                success:function (res) {
                    console.log(res)
                    if(res){
                        $("#uuid").val(res.tmp)
                        $("#captcha").attr("src",res.captcha);
                    }
                }
            })
        })
    </script>
</head>
<body>
    <form action="/sys/login" method="post">
        用户名:<input name="username" type="text"><br>
        密码:<input name="password" type="password"><br>
        验证码:<input name="captcha" type="text"><br>

        <input type="hidden" name="_header" value="5656566"/>
       <input name="tmp" type="hidden" id="uuid"><br>
        <img src="" id="captcha" style="width: 200px;height: 200px;"><br>
        <input type="submit" value="提交">
    </form>
</body>
</html>